package org.csu.onlineedubackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.csu.onlineedubackend.entity.Survey;

@Mapper
public interface SurveyMapper extends BaseMapper<Survey> {
    
    @Select("SELECT COUNT(DISTINCT user_id) FROM survey_answer WHERE survey_id = #{surveyId}")
    Integer getParticipantCount(Integer surveyId);
} 